package org.simple.spring;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

/**
 * 项目名称：spring-leaning
 * 类名称：FooAspect
 * 类描述：FooAspect
 * 创建时间：2018/8/6
 *
 * @author jiangjunjie   (E-mail:1620657419@qq.com)
 * @version v1.0
 */
@Aspect
@Component
public class FooAspect {

    @Around("execution(* org.simple.spring.ssh.service.FooService.*(..))")
    public Object log(ProceedingJoinPoint joinPoint) throws Throwable {
        System.out.println("start log:" + joinPoint.getSignature().getName());
        Object object = joinPoint.proceed();
        System.out.println("end log:" + joinPoint.getSignature().getName());
        return object;
    }

}
